#include "sky_box.h"

static const float vertics[] = {
    -1,  1,  1,     // (0) Top-left near
    1,  1,  1,     // (1) Top-right near
    -1, -1,  1,     // (2) Bottom-left near
    1, -1,  1,     // (3) Bottom-right near
    -1,  1, -1,     // (4) Top-left far
    1,  1, -1,     // (5) Top-right far
    -1, -1, -1,     // (6) Bottom-left far
    1, -1, -1      // (7) Bottom-right far
};

static const unsigned char vertics_index[] = {
    // Front
    1, 3, 0,
    0, 3, 2,

    // Back
    4, 6, 5,
    5, 6, 7,

    // Left
    0, 2, 4,
    4, 2, 6,

    // Right
    5, 7, 1,
    1, 7, 3,

    // Top
    5, 1, 4,
    4, 1, 0,

    // Bottom
    6, 2, 7,
    7, 2, 3
};

SkyBox::SkyBox() {

}

const float *SkyBox::getVertexData() {
    return vertics;
}

const unsigned char *SkyBox::getVertexElements() {
    return vertics_index;
}

size_t SkyBox::getVertexPointSize() {
    return 8;
}

size_t SkyBox::getVertexByteSize() {
    return getVertexPointSize() * getComponentSize() * sizeof(float);
}

size_t SkyBox::getComponentSize() {
    return 3;
}

size_t SkyBox::getStride() {
    return getComponentSize() * sizeof(float);
}

size_t SkyBox::getVertexIndexSize() {
    return 3 * 12;
}
